package cn.quevo.springmvc.spring.boot.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

@Data
@ConfigurationProperties(prefix = SpringMVCProperties.MVC_PREFIX)
public class SpringMVCProperties {
    public static final String MVC_PREFIX = "spring.mvc";
    /**
     * 静态文件映射
     */
    private String[] statics;
    private String defaultServlet = "default"; // 默认的Servlet
    /**
     * {@link org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer}
     */
    private boolean favorParameter = false;
    /**
     * {@link org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer}
     */
    private boolean favorPathExtension = false;
    /**
     * {@link org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer}
     */
    private boolean ignoreAcceptHeader = false;

    /**
     * 404 跳转页面
     */
    private String notFound = "/404";
    /**
     * 500 跳转页面
     */
    private String error = "/500";
    /**
     * 无权限跳转页面
     */
    private String unauthorized = "/401";
    /**
     * 登陆页面
     */
    private String login = "/login";
}